﻿using AuthZ.PolicyBased.Authorizations.Requirements;
using Microsoft.AspNetCore.Authorization;

namespace AuthZ.PolicyBased;

public static class AuthExtensions
{
    public static void RequireMinimumAge(this AuthorizationPolicyBuilder builder, int minimumAge)
    {
        builder.AddRequirements(new MinimumAgeRequirement(minimumAge));
    }
}